//
//  CellTwoTable.m
//  project-A (pianke)
//
//  Created by dllo on 16/2/1.
//  Copyright © 2016年 scott. All rights reserved.
//

#import "CellTwoTable.h"
#import "specialImage.h"
#import "InfoViewController.h"
#import <DKNightVersion.h>
@implementation CellTwoTable



-(void)dealloc{
    
    
    [_specialview release];
    [_image release];
    [_date release];
    [_name release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatview];
    }
    
    return self;
}

-(void)creatview{
    
    
    self.name.dk_textColorPicker  = DKColorWithColors([UIColor whiteColor], [UIColor colorWithRed:0.64 green:0.74 blue:0.86 alpha:1]);

    
    
    self.name = [[UILabel alloc]init];
    [self.contentView addSubview:self.name];
    self.name.font = [UIFont fontWithName:@"AmericanTypewriter-Bold" size:22];
    self.name.textColor = [UIColor whiteColor];
    self.name.numberOfLines = 2;
    [self.name release];
    
    
    self.date = [[UILabel alloc]init];
    [self.contentView addSubview:self.date];
    self.date.font = [UIFont fontWithName:@"AmericanTypewriter-Bold" size:12];
    self.date.textColor = [UIColor whiteColor];
    [self.date release];
    
    
    self.image = [[UIImageView alloc]init];
    [self.contentView addSubview:self.image];
    [self.contentView sendSubviewToBack:self.image];
        [self.image release];
 
    
    
    self.specialview = [[specialImage alloc]init];
    [self.contentView addSubview:self.specialview];
    
    [self.specialview release];
   
    
    
}

-(void)layoutSubviews{
    
    [super layoutSubviews];
    CGFloat width = self.contentView.frame.size.width;
    self.name.frame = CGRectMake(10, 10, width * 0.7, 40);
    self.date.frame = CGRectMake(10, 65, width * 0.6, 20);
    self.image.frame = CGRectMake(0, 0, width, 0.55 * width);

    self.specialview.frame = CGRectMake(10, width * 0.55 - 50,40,40);
    
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
